package com.tanhua.common.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 测试题类型枚举
 */
public enum DimensionsEnum implements IEnum<Integer> {
    EXTROVERT(1,"外向"),
    JUDGMENTAL(2,"判断"),
    ABSTRACT(3,"抽象"),
    RATIONAL(4,"理性");

    private int value;
    private String desc;

    DimensionsEnum(int value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(int value) {
        DimensionsEnum[] values = values();
        for (DimensionsEnum testTypeEnum : values) {
            if (testTypeEnum.getValue().equals(value)){
                return testTypeEnum.desc;
            }
        }
        return null;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.desc;
    }
}
